<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>svg炫酷流边按钮</title>
    <style>
        body{
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #000000;
        }
        .container{
            display: flex;
        }
        .button{
            /* 相对定位 */
            position: relative;
            width: 160px;
            height: 50px;
            margin: 0 15px;
            cursor: pointer;
        }
        .shape{
            /* 取消填充 */
            fill: none;
            /* 定义一条线 */
            stroke: #009ffd;
            /* 线的厚度 */
            stroke-width: 6;
            /* 设置虚线：虚线长度 间距 */
            stroke-dasharray: 100 400;
            /* 虚线偏移量 */
            stroke-dashoffset:  -240;
            /* 过渡效果 */
            transition: 1s ease;
        }
        .text{
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            color: #fff;
            letter-spacing: 2px;
        }
        .button:hover .shape{
            stroke: #06e6a0;
            stroke-width: 3;
            stroke-dasharray: 50 0;
            stroke-dashoffset: 0;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="button">
            <svg width="160" height="50">
                <rect class="shape" width="160" height="50"></rect>
            </svg>
            <div class="text">求点赞</div>
        </div>
        <div class="button">
            <svg width="160" height="50">
                <rect class="shape" width="160" height="50"></rect>
            </svg>
            <div class="text">求关注</div>
        </div>
        <div class="button">
            <svg width="160" height="50">
                <rect class="shape" width="160" height="50"></rect>
            </svg>
            <div class="text">求分享</div>
        </div>
    </div>
</body>

</html>